/** @jsxImportSource @emotion/react */
import * as React from "react";
import {OriginalViewProps,} from "../../common/base";
import {createItem,} from "../../common/eHelper";
import {useRecordListSubr} from "../../hook/useRecordListSub";
import {DeviceSurvey} from "../../elevator/editor";
import {config设备概况, config证书概要, EntranceSetup, Projects记录} from "./orcBase";
import {Conclusion} from "./Conclusion";
import {ProjectR} from "../../gas/utilityNj/ProjectR";
import {BoilerDiagram} from "./BoilerDiagram";
import {Explanatory} from "./Explanatory";


const recordPrintList =[
  createItem('Entrance', <EntranceSetup/>),
  createItem('ProjectList', <ProjectR nrec config={Projects记录} label={'记录目录页'}/>),
  createItem('Survey', <DeviceSurvey config={config设备概况} label={'检验结论报告-概况'}/>),
  createItem('CertificateSummary', <DeviceSurvey config={config证书概要} label={'证书的设备概况部分'}/>),
  createItem('Conclusion', <Conclusion label={'检验结论报告-下结论'}/>),
  createItem('BoilerDiagram', <BoilerDiagram label="1.2锅炉结构简图"/>),
  createItem('Explanatory', <Explanatory label={'1.3锅炉安装施工过程概述'} />),

];

export const OriginalView=
  React.forwardRef((
    { action: modAction,  verId, repId='', rep}
    :OriginalViewProps, ref
  ) => {
    const {list}=useRecordListSubr(ref,rep,recordPrintList,modAction,verId);
    return <React.Fragment>
      {list}
    </React.Fragment>;
  } );
